package com.ych.prototype;

/**
 * 声明一个克隆之身的基类
 * 继承Cloneable 接口
 * Created by 灰灰 on 2017/6/30.
 */
public class Prototype implements Cloneable {
    /**
     * 调用克隆接口，克隆自身
    * @Author : 灰灰
    * @Date : 2017/6/30 13:55
    */
    public Object clone() {
        try{
            return super.clone();
        }catch (Exception e) {
            e.printStackTrace();
            return null;
        }
    }

    private String name;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
